<?php
/**
* 这个是首页的控制器
*/
class ControllerShouye extends GetLoad
{
	
	public function index(){
		$this->load("Model/shouye");
		$this->jialiWEB();
	}
	public function jialiWEB(){

		$shouye=new ModelShouye;
		$information=$shouye->Getinformation();

		foreach ($information as $wenzhang) {
				$data['information'][]= array(
				'name' 			=>$shouye->Getname($wenzhang['name_id']) , 
				'information_id'=>$wenzhang['information_id'],
				'title'			=>$wenzhang['title'],
				'neirong'		=>$shouye->Getneirong($wenzhang['neirong']),
				'nian'			=>$wenzhang['nian'],
				'yue'			=>$wenzhang['yue'],
				'ri'			=>$wenzhang['ri'],
				'url'			=>"./index.php?route=Controller/information/ControllerInformation/index&=".$wenzhang['information_id'],
				'url2'			=>"./index.php?route=Controller/zhuye/ControllerZhuye/index&=".$wenzhang['name_id']);
			
		}

		if(isset($_COOKIE['name']))
		{
			$data['name']=$_COOKIE['name'];
		}else{
			$data['name']="游客";
		}
		//var_dump($data);
		$jiaru=$shouye->jiaru();
		foreach ($jiaru as $value) {
			$data['jiaru'][]= array(
				'name' => $value['name']);
		}
		$this->view("view/shouye",$data);



	}
}